public class EventLogEditor extends JInternalFrame
JInternalFrame
to create a more detailed
version of a generic internal frame, made to be an event log editor.
To do this, this class contains a RSyntaxTextArea
where to
manage the event log content (write, load, modify, cut, copy, paste, undo,
redo, etc). The text area also implements all the editor functions, like XML
syntax highlighting, code folding, line numbers, auto indentation, automatic
markup closing, code anti-aliasing and so on.
This class also adds specific information to the editor like if the editor content has been saved or not, if it has been validated and the absolute path of the associated file in the file system.
JInternalFrame
,
RSyntaxTextArea
,
Serialized FormJInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIcon
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
private String |
absolutePath
This string contains the absolute path of the file associated with
this editor.
|
private int |
defaultFontSize
Convenience variable for defining in only one place (in the constructor) the
default value of the font size of the
textArea and to make all the
processes that need this value, to retrieve it using the
getDefaultFontSize() method. |
private JDialog |
filterDialog
This variable takes trace of the associate filters panel opened for this editor.
|
private FootprintFilter |
footprintFilter
Defines the filter to use when generating the footprint matrix for this editor content.
|
private ArrayList<String> |
footprintMatrices
This variable contains
String objects that represent the
footprint matrices associated to the logs that are inside this editor. |
private boolean |
isContentModified
Defines if the
textArea content has been modified or not. |
private boolean |
isContentValidated
Defines if the actual
textArea content has been validated against
the XSD schema of XES or not. |
private static long |
serialVersionUID
Auto-Generated Serial Version UID for this class.
|
private org.fife.ui.rsyntaxtextarea.RSyntaxTextArea |
textArea
Defines the text area where the user can write and modify the event log.
|
private org.fife.ui.rtextarea.RUndoManager |
undoManager
Defines the
textArea manager for the undo and redo actions,
that will remember all the edits and give the possibility to navigate
through them. |
private Collection<XLog> |
xesLogs
This
Collection of XLog records all the generated
objects that are a Java representation of the XES textual logs that are inside
the editor textArea . |
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
EventLogEditor(String title,
boolean resizable,
boolean closable,
boolean maximizable,
boolean iconifiable,
int internalFrameID)
Creates a
EventLogEditor with the specified title, resizability,
closability, maximizability, iconifiability and ID. |
Modifier and Type | Method and Description |
---|---|
void |
addCompletions(String[] completions,
String[] templatesId)
This method allows to add to the editor
RSyntaxTextArea a set of
predefined completion for keywords and templates id. |
void |
addDocumentListener(DocumentListener listener)
Sets the specified
DocumentListener to the textArea . |
void |
addFootprintMatrix(String footprintMatrix)
Adds a new footprint matrix to the
footprintMatrices list. |
void |
addTemplates(List<List<String>> templates)
This method allows to add to the editor
RSyntaxTextArea a set of
predefined templates, i.e. a block of code that can be added inside the editor
using a specific keyword. |
void |
closeFilterDialog()
This method first checks if this editor has an associated filter dialog (using
hasFilterDialog() )
and only in that case it closes that dialog and dissociate it from this editor (using setFilterDialog(JDialog) )
with null value. |
void |
copy()
|
void |
cut()
|
void |
discardAllEdits()
Empties the
undoManager sending each edit a die message in the process. |
private void |
frameSettings(int internalFrameID)
Sets the graphic details and components of this internal frame.
|
String |
getAbsolutePath()
This method returns the
absolutePath of the file associated with this editor. |
int |
getDefaultFontSize()
This method returns the
defaultFontSize value of the textArea . |
JDialog |
getFilterDialog()
This method returns the opened
JDialog filterDialog that implements the filters panel associated with this editor. |
int |
getFontSize()
This method returns the font size of the
textArea . |
FootprintFilter |
getFootprintFilter()
This method returns the
FootprintFilter footprintFilter to use when generating the footprint matrix of this editor content. |
Iterator<String> |
getFootprintMatrices()
This method returns an
Iterator over the footprintMatrices list to
retrieve all the list elements. |
org.fife.ui.rsyntaxtextarea.RSyntaxTextArea |
getTextArea()
This method returns the
RSyntaxTextArea textArea . |
void |
getTextAreaContent(Writer out)
|
Collection<XLog> |
getXesLogs()
Returns the
Collection of XLog associated with this editor
content and represented by the xesLogs variable. |
boolean |
hasFilterDialog()
This method returns
true if there is a filterDialog associated with this editor, false otherwise (if null ). |
boolean |
isContentModified()
This method returns the
boolean value of the isContentModified
variable, that specifies if the textArea content has been modified or not. |
boolean |
isContentValidated()
This method returns the
boolean value of the isContentValidated variable,
that specifies if the textArea content has been validated or not against the XSD schema of XES. |
boolean |
isFootprintMatrixGenerated()
This method returns
true if there is at least one footprint matrix inside
the footprintMatrices list, false otherwise. |
boolean |
isXesLogsGenerated()
This method returns
true if there is a Collection of XLog
generated for this editor content, false otherwise. |
void |
paste()
Transfers the contents of the system clipboard into the
textArea . |
void |
redo()
Redo the last undo made in the
textArea , using the undoManager ,
if there is any edit to be redone. |
void |
resetAll()
Reset all the saved data associated with this editor.
|
void |
resetFootprintFilter()
This method resets the values of the
FootprintFilter footprintFilter , setting them
as not defined (except the minimum number of occurrences per trace, that is always defined as a number value). |
void |
resetFootprintMatrices()
Clears the
footprintMatrices list, removing all the footprint matrices in it. |
void |
resetXesLogs()
This method reset the
Collection of XLog associated with this editor
content and represented by the xesLogs variable. |
void |
setAbsolutePath(String path)
This method sets the value of the
absolutePath variable, that specifies
the absolute path of the file associated with this editor. |
void |
setContentModified(boolean contentModified)
This method sets the value of the
isContentModified variable, that specifies
if the textArea content has been modified or not. |
void |
setContentValidated(boolean contentValidated)
This method sets the value of the
isContentValidated variable, that specifies
if the textArea content has been validated or not against the XSD schema of XES. |
void |
setDefaultFontSize()
This method sets the font size of the
textArea to its default value,
defined in the defaultFontSize variable. |
void |
setFilterDialog(JDialog dialog)
This method sets the
filterDialog value, using the passed JDialog . |
void |
setFontSize(int size)
This method sets the font size of the
textArea . |
void |
setSelected(boolean selected)
Selects or not the internal frame if it's showing.
|
void |
setTextAreaContent(Reader in)
This method sets the content of the
RSyntaxTextArea textArea using the
passed Reader as source for the content. |
void |
setVisible(boolean aFlag)
Makes the component visible or invisible.
|
void |
setXesLogs(Collection<XLog> logs)
Sets the
Collection of XLog associated with this editor
content and represented by the xesLogs variable. |
private void |
textAreaSettings()
Sets the graphic details and components of the
textArea . |
void |
undo()
Undo the last edit made in the
textArea , using the undoManager ,
if there is any edit to be undone. |
void |
updateFootprintFilter(int minTraceOccurrences,
Collection<XEventClassifier> classifiers,
XEventClassifier selectedClassifier,
HashMap<String,Boolean> startEvents,
HashMap<String,Boolean> endEvents)
This method updates the
FootprintFilter footprintFilter associate to this editor content, using the passed parameters. |
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLastCursor, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setCursor, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setTitle, setUI, show, toBack, toFront, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private static final long serialVersionUID
private org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea
RSyntaxTextArea
private org.fife.ui.rtextarea.RUndoManager undoManager
textArea
manager for the undo and redo actions,
that will remember all the edits and give the possibility to navigate
through them.RUndoManager
private boolean isContentModified
textArea
content has been modified or not.
This variable is set to true
when the user modifies the editor
content. This variable is set to false
otherwise to show that
no modification has been made to the content after the last save or after the
opening of a document (a new empty one or an existing one from a file).
private boolean isContentValidated
textArea
content has been validated against
the XSD schema of XES or not.
This variable is set to true
when the the editor content has
been validated. This variable is set to false
otherwise.
private String absolutePath
null
value instead if the content
of the editor has never been saved yet.private int defaultFontSize
textArea
and to make all the
processes that need this value, to retrieve it using the
getDefaultFontSize()
method.
This is made because the value of the font size can change at runtime, so we keep the original one here and make an access to it for all the processes that need the default value.
private Collection<XLog> xesLogs
Collection
of XLog
records all the generated
objects that are a Java representation of the XES textual logs that are inside
the editor textArea
.
These XLog
are generated by the footprint algorithm and stored
here to do not have to calculate them again when needed.
In case of any modification of the editor content, this collection will be reset because the object inside of it are not valid anymore.
Collection
,
XLog
private ArrayList<String> footprintMatrices
String
objects that represent the
footprint matrices associated to the logs that are inside this editor.
These matrices will be created and stored in this variable by the footprint matrix algorithm, to retrieve them when needed instead of recreating a new one every time.
In case of any modification of the editor content, this list will be reset because the matrices inside of it are not valid anymore.
private FootprintFilter footprintFilter
This filter will be applied to every log in this editor by the footprint algorithm to generate the respective footprint matrix.
This variable remembers the user setting for this editor for the relative footprint generation, it can be modified and updated by the application, accordingly to the user decision.
FootprintFilter
private JDialog filterDialog
Because the panel is a non-modal dialog, it stays opened while the user does other operation inside the application. To close it automatically in certain situations, this reference is needed so that the editor can close automatically its associated filters panel.
JDialog
public EventLogEditor(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable, int internalFrameID)
EventLogEditor
with the specified title, resizability,
closability, maximizability, iconifiability and ID.
Then defines all its settings by calling the frameSettings(int)
method.
title
- the String to display in the title barresizable
- if true, the internal frame can be resizedclosable
- if true, the internal frame can be closedmaximizable
- if true, the internal frame can be maximizediconifiable
- if true, the internal frame can be iconifiedinternalFrameID
- the identifier of the EventLogEditor
frameprivate void frameSettings(int internalFrameID)
internalFrameID
- the identifier of the EventLogEditor
frameprivate void textAreaSettings()
textArea
.public org.fife.ui.rsyntaxtextarea.RSyntaxTextArea getTextArea()
RSyntaxTextArea
textArea
.RSyntaxTextArea
text area.RSyntaxTextArea
public void getTextAreaContent(Writer out) throws IOException
RSyntaxTextArea
textArea
into the
passed Writer
.
This get method uses the write(Writer)
method of JTextComponent
to directly
write the content into an output, avoiding the known errors that come with the use of the
getText()
method of JTextComponent
objects.
Instead of using the getText()
method and then write the returned string into an
output stream, the developer should use this method to directly write the textArea
into the selected
output.
out
- the Writer
where to write the textArea
contentIOException
- if an exception occurred while calling the write(Writer)
method of JTextComponent
RSyntaxTextArea
public void setTextAreaContent(Reader in) throws IOException
RSyntaxTextArea
textArea
using the
passed Reader
as source for the content.
This set method uses the read(Writer, Object)
method of JTextComponent
to directly insert content into the RSyntaxTextArea
, avoiding the known errors that come
with the use of the setText(String)
method of JTextComponent
objects.
Instead of reading the content from an input stream into a string and then use the setText(String)
method to set the textArea
content, the developer should use this method to directly set the
textArea
content using the passed input source.
in
- the Reader
from where to read the textArea
content to setIOException
- if an exception occurred while calling the read(Writer, Object)
method of JTextComponent
RSyntaxTextArea
public boolean isContentModified()
boolean
value of the isContentModified
variable, that specifies if the textArea
content has been modified or not.boolean
value of the isContentModified
variable.public void setContentModified(boolean contentModified)
isContentModified
variable, that specifies
if the textArea
content has been modified or not.contentModified
- true
if the content has been modified, false
if the content has been savedpublic boolean isContentValidated()
boolean
value of the isContentValidated
variable,
that specifies if the textArea
content has been validated or not against the XSD schema of XES.boolean
value of the isContentValidated
variable.public void setContentValidated(boolean contentValidated)
isContentValidated
variable, that specifies
if the textArea
content has been validated or not against the XSD schema of XES.contentValidated
- true
if the content has been validated, false
otherwisepublic String getAbsolutePath()
absolutePath
of the file associated with this editor.String
representing the absolute path of the associated file, null
if there is not an associated file yet.public void setAbsolutePath(String path)
absolutePath
variable, that specifies
the absolute path of the file associated with this editor.path
- the String
representing the absolute path of the file associated with this editorpublic int getDefaultFontSize()
defaultFontSize
value of the textArea
.textArea
.public void setDefaultFontSize()
textArea
to its default value,
defined in the defaultFontSize
variable.public int getFontSize()
textArea
.textArea
.public void setFontSize(int size)
textArea
.size
- the font size (expressed in pt) to set to the textArea
public Collection<XLog> getXesLogs()
Collection
of XLog
associated with this editor
content and represented by the xesLogs
variable.Collection
of XLog
generated for this editor content.public void setXesLogs(Collection<XLog> logs)
Collection
of XLog
associated with this editor
content and represented by the xesLogs
variable.logs
- the Collection
of XLog
to set as generated log for this editor contentpublic void resetXesLogs()
Collection
of XLog
associated with this editor
content and represented by the xesLogs
variable.public boolean isXesLogsGenerated()
true
if there is a Collection
of XLog
generated for this editor content, false
otherwise.true
if there is a Collection
of XLog
generated for this editor content, false
otherwise.public void addFootprintMatrix(String footprintMatrix)
footprintMatrices
list.footprintMatrix
- the String
representing the footprint matrix to addpublic Iterator<String> getFootprintMatrices()
Iterator
over the footprintMatrices
list to
retrieve all the list elements.Iterator
of the footprintMatrices
list.public void resetFootprintMatrices()
footprintMatrices
list, removing all the footprint matrices in it.public boolean isFootprintMatrixGenerated()
true
if there is at least one footprint matrix inside
the footprintMatrices
list, false
otherwise.
If true
, it means that the footprint matrix algorithm has been processed at
least one time over the content of this editor and it has generated one or more footprint
matrices for the log (or logs, if more than one matrix are present) contained inside this editor.
true
if there is at least one footprint matrix inside the footprintMatrices
list, false
otherwise.public FootprintFilter getFootprintFilter()
FootprintFilter
footprintFilter
to use when generating the footprint matrix of this editor content.FootprintFilter
to use for the editor content when generating the respective footprint matrix.public void updateFootprintFilter(int minTraceOccurrences, Collection<XEventClassifier> classifiers, XEventClassifier selectedClassifier, HashMap<String,Boolean> startEvents, HashMap<String,Boolean> endEvents)
FootprintFilter
footprintFilter
associate to this editor content, using the passed parameters.
The method also deletes the generated footprintMatrices
associated with this editor, because they are not valid anymore due to the
change just made to the filter used to generate them and they need to be regenerated again with the new filter settings.
minTraceOccurrences
- the minimum number of occurrence per trace to be consideredclassifiers
- the Collection
of all XEventClassifier
registered in the editor logsselectedClassifier
- the XEventClassifier
selected to use for the footprint generationstartEvents
- the HashMap
of all the start XEvent
events in the editor logs, with a true
value if they are selected in the filter, false
otherwiseendEvents
- the HashMap
of all the end XEvent
events in the editor logs, with a true
value if they are selected in the filter, false
otherwisepublic void resetFootprintFilter()
FootprintFilter
footprintFilter
, setting them
as not defined (except the minimum number of occurrences per trace, that is always defined as a number value).public JDialog getFilterDialog()
JDialog
filterDialog
that implements the filters panel associated with this editor.JDialog
filterDialog
opened in the View, associated with this editor.public void setFilterDialog(JDialog dialog)
filterDialog
value, using the passed JDialog
.dialog
- the JDialog
that implements the filters panel associated with this editor opened by the View, null
to remove the associationpublic boolean hasFilterDialog()
true
if there is a filterDialog
associated with this editor, false
otherwise (if null
).true
if there is a filterDialog
associated with this editor, false
otherwise (if null
).public void closeFilterDialog()
hasFilterDialog()
)
and only in that case it closes that dialog and dissociate it from this editor (using setFilterDialog(JDialog)
)
with null
value.public void resetAll()
xesLogs
and footprintMatrices
if present,
resets the footprintFilter
if complete and close the filterDialog
if opened.public void undo() throws CannotUndoException
textArea
, using the undoManager
,
if there is any edit to be undone.CannotUndoException
- if the undoManager
cannot undo the last editpublic void redo() throws CannotRedoException
textArea
, using the undoManager
,
if there is any edit to be redone.CannotRedoException
- if the undoManager
cannot redo the last undopublic void discardAllEdits()
undoManager
sending each edit a die message in the process.public void cut()
public void copy()
public void paste()
textArea
.
If there is a selection in the textArea
, it is replaced with the contents
of the clipboard. If there is no selection, the clipboard contents are inserted in
front of the current insert position in the textArea
. If the clipboard is
empty, the command does nothing.public void addDocumentListener(DocumentListener listener)
DocumentListener
to the textArea
.listener
- the DocumentListener
to add to the textArea
public void addTemplates(List<List<String>> templates)
RSyntaxTextArea
a set of
predefined templates, i.e. a block of code that can be added inside the editor
using a specific keyword.
It receives a list composed by three list: the first one is the list of IDs of the templates, the ones that the user can write in the editor for recalling the template using CTRL+SHIFT+SPACE; the second list is the list of begin parts of the templates, i.e. the part that will be added before the position where the cursor will be positioned; the third list is the list of end parts of the templates, i.e. the part that will be added after the position where the cursor will be positioned.
The method will take these three lists and add to the editor the templates, reading the same element of each list as a template (that is composed by an id, a begin part and an end part) until the end of the lists.
templates
- a List
of three List
of String
, defined as above.public void addCompletions(String[] completions, String[] templatesId)
RSyntaxTextArea
a set of
predefined completion for keywords and templates id.
It receives an array of keywords and an array with all the templates id.
The method sets this two set of String
elements to the completion
provider to make them available in the editor.
While writing a word in the editor, pressing the CTRL +SPACE macro will open the menu of all the possible keywords that start with that text substring.
completions
- an array of String
elements that represents the keywords to set as completionstemplatesId
- an array of String
elements that represents the templates id to set as completionspublic void setSelected(boolean selected) throws PropertyVetoException
This method first calls the superclass method to implement the correct
operation, then adds to this process the status changing of the filterDialog
associated with this editor, if present, modifying its visualisation on screen
depending on the value of the passed variable.
setSelected
in class JInternalFrame
selected
- a boolean, where true
means this internal frame should become selected (currently active) and false
means it should become deselectedPropertyVetoException
- when the attempt to set the property is vetoed by the JInternalFrameJInternalFrame
public void setVisible(boolean aFlag)
This method first calls the superclass method to implement the correct
operation, then adds to this process the status changing of the filterDialog
associated with this editor, if present, modifying its visualisation on screen
depending on the value of the passed variable.
setVisible
in class JComponent
aFlag
- true
to make the component visible; false
to make it invisibleJInternalFrame